home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / usr / share / festival / languages.scm < prev    next >
Encoding:
Text File  |  2006-12-20  |  5.2 KB  |  150 lines

  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ;;;                                                                       ;;
  3. ;;;                Centre for Speech Technology Research                  ;;
  4. ;;;                     University of Edinburgh, UK                       ;;
  5. ;;;                       Copyright (c) 1996,1997                         ;;
  6. ;;;                        All Rights Reserved.                           ;;
  7. ;;;                                                                       ;;
  8. ;;;  Permission is hereby granted, free of charge, to use and distribute  ;;
  9. ;;;  this software and its documentation without restriction, including   ;;
  10. ;;;  without limitation the rights to use, copy, modify, merge, publish,  ;;
  11. ;;;  distribute, sublicense, and/or sell copies of this work, and to      ;;
  12. ;;;  permit persons to whom this work is furnished to do so, subject to   ;;
  13. ;;;  the following conditions:                                            ;;
  14. ;;;   1. The code must retain the above copyright notice, this list of    ;;
  15. ;;;      conditions and the following disclaimer.                         ;;
  16. ;;;   2. Any modifications must be clearly marked as such.                ;;
  17. ;;;   3. Original authors' names are not deleted.                         ;;
  18. ;;;   4. The authors' names are not used to endorse or promote products   ;;
  19. ;;;      derived from this software without specific prior written        ;;
  20. ;;;      permission.                                                      ;;
  21. ;;;                                                                       ;;
  22. ;;;  THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK        ;;
  23. ;;;  DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING      ;;
  24. ;;;  ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT   ;;
  25. ;;;  SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE     ;;
  26. ;;;  FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES    ;;
  27. ;;;  WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN   ;;
  28. ;;;  AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,          ;;
  29. ;;;  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF       ;;
  30. ;;;  THIS SOFTWARE.                                                       ;;
  31. ;;;                                                                       ;;
  32. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  33. ;;;
  34. ;;;  Specification of voices and some major choices of synthesis
  35. ;;;
  36. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  37. ;;;
  38. ;;;  This should use some sort of database description for voices so
  39. ;;;  new voices will become automatically available.
  40. ;;;
  41.  
  42. (define (language_british_english)
  43. "(language_british_english)
  44. Set up language parameters for British English."
  45.   (require 'voices)
  46.   ;;  Will get more elaborate, with different choices of voices in language
  47.  
  48.   (set! male1 voice_rab_diphone)
  49.   (set! male2 voice_don_diphone)
  50.   (if (symbol-bound? 'voice_gsw_diphone)
  51.       (set! male3 voice_gsw_diphone))
  52.   (if (symbol-bound? 'voice_gsw_450)
  53.       (set! male4 voice_gsw_450))
  54.  
  55.   (male1)
  56.   (Parameter.set 'Language 'britishenglish)
  57. )
  58.  
  59.  
  60. (define (language_italian)
  61. "(language_italian)
  62. Set up language parameters for Italian."
  63.  
  64.   (if (symbol-bound? 'voice_lp_diphone)
  65.       (set! female1 voice_lp_diphone))
  66.   (set! male1 voice_pc_diphone)
  67.  
  68.   (male1)
  69.   (Parameter.set 'Language 'italian)
  70. )
  71.  
  72.  
  73. (define (language_american_english)
  74. "(language_american_english)
  75. Set up language parameters for Aemerican English."
  76.  
  77.   (if (symbol-bound? 'voice_kal_diphone)
  78.       (set! female1 voice_kal_diphone))
  79.   (set! male1 voice_ked_diphone)
  80.  
  81.   (male1)
  82.   (Parameter.set 'Language 'americanenglish)
  83. )
  84.  
  85. (define (language_finnish)
  86. "(language_finnish)
  87. Set up language parameters for Finnish."
  88.   (if (symbol-bound? 'voice_suo_lj_diphone)
  89.       (set! female1 voice_suo_lj_diphone))
  90.   (set! male1 voice_hy_fi_mv_diphone)
  91.  
  92.   (male1)
  93.   (Parameter.set 'Language 'finnish)
  94. )
  95.  
  96. (define (language_scots_gaelic)
  97. "(language_scots_gaelic)
  98. Set up language parameters for Scots Gaelic."
  99.   (error "Scots Gaelic not yet supported.")
  100.  
  101.   (Parameter.set 'Language 'scotsgaelic)
  102. )
  103.  
  104. (define (language_welsh)
  105. "(language_welsh)
  106. Set up language parameters for Welsh."
  107.  
  108.   (set! male1 voice_welsh_hl)
  109.  
  110.   (male1)
  111.   (Parameter.set 'Language 'welsh)
  112. )
  113.  
  114. (define (language_castillian_spanish)
  115. "(language_spanish)
  116. Set up language parameters for Castillian Spanish."
  117.  
  118.   (voice_el_diphone)
  119.   (set! male1 voice_el_diphone)
  120.  
  121.   (Parameter.set 'Language 'spanish)
  122. )
  123.  
  124. (define (select_language language)
  125.   (cond
  126.    ((or (equal? language 'britishenglish)
  127.     (equal? language 'english))  ;; we all know its the *real* English
  128.     (language_british_english))
  129.    ((equal? language 'americanenglish)
  130.     (language_american_english))
  131.    ((equal? language 'scotsgaelic)
  132.     (language_scots_gaelic))
  133.    ((equal? language 'welsh)
  134.     (language_welsh))
  135.    ((equal? language 'italian)
  136.     (language_italian))
  137.    ((equal? language 'spanish)
  138.     (language_castillian_spanish))
  139.    ((equal? language 'finnish)
  140.     (language_finnish))
  141.    ((equal? language 'klingon)
  142.     (language_klingon))
  143.    (t
  144.     (print "Unsupported language, using English")
  145.     (language_british_english))))
  146.  
  147. (defvar language_default language_british_english)
  148.  
  149. (provide 'languages)
  150.